import {
    get,
    post,
    put,
    del
} from "@utils/http";

// 账号登出
export const reqLogout = (data) => post("/user/logout", data);

// 一、租户下单位数量
export const reqOrgCount = (data) => post(`/statistics/orgCount`, data);

//二、租户下单位类型
export const reqFlatType = (data) => post(`/statistics/flatType`, data);

//三、租户下建筑物性质
// export const reqBuildingType = (tenantId) => get(`/statistics/buildingType/${tenantId}`);

// 四、产品类型
export const reqDeviceType = (data) => post("/statistics/deviceType", data);

// 五、告警类型
export const reqAlarmType = (data) => post("/statistics/alarmType", data);

// 六、获取mqtt信息
export const reqClient = (id) => get(`/user/client/${id}`);

// 六、设备统计（设备总数为在离线相加）
export const reqDeviceCount = (data) => post("/statistics/deviceCount", data);

// 七、告警总数
export const reqAlarmTotal = (data) => post("/statistics/alarmTotal", data);

// 每日统计 今日告警 今日新增
export const reqTodayAlarmCount = (data) => post("/statistics/todayStatistics", data);

// 九、告警处理统计
export const reqHandlingStatusCount = (data) => post("/statistics/handlingStatusCount", data);

//十、租户下本周单位告警排行
export const reqOrgAlarm = (data) => post(`/statistics/orgAlarm`, data);

// 十一、省级行政区域
export const reqRegion = (data) => post("/statistics/region", data);

// 十二、市级行政区域
export const reqCity = (data) => post("/statistics/city", data);

// 十三、区级行政区域
export const reqArea = (data) => post("/statistics/area", data);

// 十四、街道行政区域
export const reqStreet = (data) => post("/statistics/street", data);

// 社区行政区域
export const reqCommunity = (data) => post("/statistics/community", data);

// 十五、单位列表
export const reqOrg = (data) => post("/statistics/org", data);

//十六、建筑物列表
export const reqSpaceByOrgId = (orgId) => get(`/statistics/spaceByOrgId/${orgId}`);

//十七、单位最近七天告警
export const reqSevenDayAlarm = (orgId) => get(`/statistics/sevenDayAlarm/${orgId}`);

// 十八、告警处理
export const reqParkEdit = (data) => put(`/alarm/alarmHandling`, data);

// 十九、告警闭环
export const reqClosedLoop = (data) => put(`/alarm/closedLoop`, data);

// 十六、建筑物详情
export const reqStatistics = (spaceId) => get(`/statistics/space/${spaceId}`);

// 单位安装设备统计
export const reqOrgDevice = (data) => post("/statistics/orgDevice", data);

// 安装点获取所属建筑物所有接警人
export const reqGetBuildingReceiver = (spaceId) => get(`/space/getBuildingReceiver/${spaceId}`);

// 火警通知整栋楼的接警人
export const reqFire = (id) => get(`/alarm/fire/${id}`);

// 单位摄像头数量
export const reqOrgCamera = (data) => post("statistics/orgCamera", data);